package com.bdqn.service;

import com.bdqn.pojo.SysUser;
import com.bdqn.repository.UserRepository;
import jakarta.annotation.Resource;
import jakarta.persistence.Cacheable;

import javax.crypto.KeyGenerator;

public class UserService {
    @Resource
    private UserRepository userRepository;
    @Cacheable(KeyGenerator = "keyGenerator" , value = "user");
    public SysUser getUser(Long usrId){
    return userRepository.findById(usrId).get();
    }
}
